<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style type="text/css">
    div{
        font-style: italic;
        color: red;
        font-size: 70px;
        text-align: center;
        font-family: serif;
        
    }
</style>
<script type="text/javascript">
    function time() {
        var today = new Date();
        var year = today.getFullYear();
        var month = today.getMonth();
        var day = today.getDate();
        var hours = today.getHours();
        var minutes = today.getMinutes();
        var seconds = today.getSeconds();
        var week = "";
        week = today.getDay();
        switch (week) {
            case 0:
                week = "星期天";
                break;
            case 1:
                week = "星期一";
                break;
            case 2:
                week = "星期二";
                break;
            case 3:
                week = "星期三";
                break;
            case 4:
                week = "星期四";
                break;
            case 5:
                week = "星期五";
                break;
            case 6:
                week = "星期六";
                break;
        }
        var ampm = "";
        if (hours > 12){
            ampm = "PM";
        }else{
            ampm = "AM";
        }

        if (seconds<10){
            seconds = "0"+seconds;
        }
        if (minutes<10){
            minutes = "0"+minutes;
        }

        var time = year + "年" + (month + 1) + "月" + day + "日 " + hours + ":" + minutes + ":" + seconds + " " + ampm +" "+ week;
        document.getElementById("time").innerHTML = time;

    }
    window.setInterval("time()", 1000);

</script>
<body onload="time()">
    <h1><div id="time"></div></h1>
</body>
</html>